package com.telephone.purchase.mapper;

import com.telephone.purchase.entity.Good;
import com.telephone.purchase.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface GoodMapper {
    int deleteByPrimaryKey(Long goodId);

    int insert(Good record);

    int insertSelective(Good record);

    Good selectByPrimaryKey(Long goodId);

    int updateByPrimaryKeySelective(Good record);

    int updateByPrimaryKey(Good record);

    List<Goods> selectGood();

    List<Goods> selectGoodByTime();

//    @Select("SELECT c.CLASSIFY_ID,c.CLASSIFY_NAME,g.GOOD_ID,g.GOOD_NAME,g.GOOD_URL FROM good g LEFT JOIN classify c on c.CLASSIFY_ID=g.CLASSIFY_ID")
    List<Goods> selectGoodClass(Long classifyId);
}